Digital automatic gain control

ABSTRACT

Systems, devices, and methods are provided to inhibit apparent amplitude modulation in non-linear processing that causes distortion in a processed signal. One aspect of the invention includes a hearing aid. The hearing aid includes a microphone to receive an input signal, a speaker to reproduce the input signal, and a processor. The processor processes the input signal using a gain. The processor includes an inhibitor, which inhibits distortions, and an adjuster, which adjusts the gain. The inhibitor acts to smooth an envelope of the input signal to inhibit undesired modulation. The adjuster adjusts the gain if the envelope is either above or below a threshold.

TECHNICAL FIELD

[0001] The present invention relates generally to audio signalprocessing. More particularly, it pertains to inhibiting distortionsthat arise from adjusting gains of preamplifiers.

BACKGROUND

[0002] Sound systems can be broken down into three general components:an input device, such as a microphone; a processing system; and anoutput device, such as a speaker. Sounds are picked up by themicrophone, transmitted to the processing system where they areprocessed, and then projected by the speaker so that the sounds can beheard at an appropriate distance. Both the microphone and the speakerare generally considered to be transducers.

[0003] A transducer is a device that transforms one form of energy intoanother form of energy. In the case of a microphone, sound energy, whichcan be detected by the human ear in the range of 20 Hertz to 20,000Hertz, is transformed into electrical energy in the form of anelectrical signal. The electrical signal can then be processed by aprocessing system. After the signal is processed, the speaker transformsthe electrical energy in the electrical signal to sound energy again.

[0004] Before reaching the processing system, the electrical signal isamplified by a preamplifier using a certain gain. However, if theelectrical signal already represents a powerful sound energy, theamplified electrical signal may be at a level beyond the linearoperating range of the signal processing circuitry following thepreamplifier. To limit the electrical signal to the operating range ofthe signal processing circuitry, an automatic gain control is used.

[0005] The automatic gain control detects the level of the waveform ofthe electrical signal, compares the level to a threshold, and adjuststhe gain of the preamplifier to decrease the level of the electricalsignal if the envelope is higher than the threshold. When the level isbelow the threshold, the automatic gain control increases the gain toits uncompressed level.

[0006] However, the automatic gain control, which is supposed to help,also hinders by adding undesired distortions to the electrical signal.These undesired distortions are frustrating to users of sound systems ingeneral, but are particularly debilitating for users of hearing aidssince these users depend upon such aids to maintain their ability tocommunicate. Without an acceptable solution to the undesireddistortions, the optimum level of performance desired by the end userwill not be achieved.

[0007] Thus, what are needed are systems, devices, and methods toinhibit AGC-induced distortions in sound systems, such as hearing aids.

SUMMARY

[0008] The above-mentioned problems with distortions in audio signalprocessing as well as other problems are addressed by the presentinvention and will be understood by reading and studying the followingspecification. Systems, devices, and methods are described which inhibitAGC-induced distortions.

[0009] One illustrative embodiment includes a method for providingautomatic gain control. The method includes smoothing an envelope of aninput signal having a gain and adjusting the gain that is applied to theinput signal. The act of adjusting is dependent on the level of theenvelope relative to a threshold. The act of smoothing inhibitsdistortions arising from apparent modulation of the input signal.

[0010] Another illustrative embodiment includes a hearing aid. Thehearing aid includes an adjuster to adjust the gain so as to amplify aninput signal, and a detector to form a smooth envelope that is arectified version from the input signal. The detector presents thesmooth envelope to the adjuster. The adjuster adjusts the gain that isapplied to the input signal. The adjuster adjusts the gain based on thelevel of the envelope relative to a threshold.

[0011] The digital system as will be described has a number of benefitsnot seen before. One benefit is an enhanced manufacturing process thatreduces a need for external components, such as capacitors, and the needto couple the external components to a circuit through I/O pins. Anotherbenefit includes a reduction in the die area required to implement thedigital automatic gain control loop. Other benefits include an enhancedcontrol of the tolerance of the bandwidth of the automatic gain control,and the tolerance of the loop time constants of the automatic gaincontrol. The system also benefits from an enhanced power efficiency andlow operating voltage performance. Additionally, the system allows anon-linear signal processing by selectively controlling the gain of thepreamplifier or providing information to a Nyquist-rate digital signalprocessor to compensate for adaptive gain changes in the preamplifier.

[0012] These and other embodiments, aspects, advantages, and features ofthe present invention will be set forth in part in the description whichfollows, and in part will become apparent to those skilled in the art byreference to the following description of the invention and drawings orby practice of the invention. The aspects, advantages, and features ofthe invention are realized and attained by means of theinstrumentalities, procedures, and combinations particularly pointed outin the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 is a block diagram of a system according to one embodimentof the invention.

[0014]FIG. 2 is a graph of a signal according to one embodiment of theinvention.

[0015]FIG. 3 is a graph of a signal according to one embodiment of theinvention.

[0016]FIG. 4 is a graph of a signal according to one embodiment of theinvention.

[0017]FIG. 5 is a graph of a signal according to one embodiment of theinvention.

[0018]FIG. 6 is a block diagram of a system according to one embodimentof the invention.

[0019]FIG. 7 is a block diagram of a filter according to one embodimentof the invention.

[0020]FIG. 8 is a block diagram of a filter according to one embodimentof the invention.

[0021]FIG. 9 is a process diagram of a method according to oneembodiment of the invention.

DETAILED DESCRIPTION

[0022] In the following detailed description of the invention, referenceis made to the accompanying drawings that form a part hereof, and inwhich are shown, by way of illustration, specific embodiments in whichthe invention may be practiced. In the drawings, like numerals describesubstantially similar components throughout the several views. Theseembodiments are described in sufficient detail to enable those skilledin the art to practice the invention. Other embodiments may be utilizedand structural, logical, and electrical changes may be made withoutdeparting from the scope of the present invention.

[0023] The embodiments of the invention focus on inhibiting distortionsthat arise from automatic adjustments of the gain of preamplifiers insound systems. An ear-worn hearing aid is an example of such a soundsystem. As discussed hereinbefore, the automatic gain control, whichhelps in adjusting the gain of the preamplifier, also hinders by addingundesired distortions to the electrical signal.

[0024] The automatic gain control detects the envelope of the waveformof the electrical signal, compares the envelope to a threshold, andadjusts the gain of the preamplifier. The act of detecting the envelopeincludes sampling the waveform of the electrical signal to form samplesof the envelope that are representative of the magnitude of thewaveform. Each sample of the envelope is then compared to the thresholdby the act of comparing. If any of the samples is greater than or lessthan the threshold, the gain of the preamplifier is adjusted by the actof adjusting. After the gain is adjusted, the preamplifier amplifies theelectrical signal so as to form an amplified electrical signal.

[0025] A curious phenomenon may occur during the acts of detecting,comparing, and adjusting: The magnitude of the waveform of the amplifiedelectrical signal, for certain frequencies, appears as if it has beenmodulated so as to form an amplitude modulation. This amplitudemodulation is unwanted because it will give rise to the undesireddistortions. This phenomenon occurs when the frequency of the electricalsignal is slightly removed from a rational factor of the samplingfrequency.

[0026] Each sample of the envelope that includes the apparent modulationis then compared to the threshold by the act of comparing. If any of thesamples is greater than or less than the threshold, the gain of thepreamplifier is adjusted by the act of adjusting. However, because ofthe apparent modulation in the envelope, the gain no longer tracks thetrue envelope of the signal but varies periodically. This gain, whichvaries periodically, is applied to the electrical signal by thepreamplifier. The preamplifier produces an amplitude modulation as aresult of the application of the gain, which varies, to the electricalsignal.

[0027] This amplitude modulation adds undesired frequency components tothe electrical signal. These undesired frequency components aredistortions which are inhibited by the embodiments of the invention. Theembodiments of the invention solve this and other problems as discussedhereinbelow.

[0028]FIG. 1 is a block diagram of a system in accordance with oneembodiment. A system 100 includes a microphone 102. The microphone 102transduces sound energy into an electrical signal. The microphone 102 ispowered by a voltage supply 104. The microphone 102 also couples toground 106.

[0029] The electrical signal is presented to a capacitor 108. Thecapacitor 108 removes the direct-current (DC) component of theelectrical signal and presents the electrical signal to a preamplifier110 without the direct-current component. The preamplifier 110 amplifiesthe electrical signal using a gain. As discussed hereinbefore, theelectrical signal may be at a level that is too weak for subsequentcircuitry to process. The preamplifier 110 adjusts the level of theelectrical signal so that the electrical signal is within a range thatis appropriate for further processing.

[0030] The electrical signal, which has been amplified, is presented toan analog-to-digital converter 112. The analog-to-digital converter 112converts the electrical signal from an analog form to a digital form.The digital form includes a desired number of bits (N) at apredetermined sampling rate (F_(S)). The electrical signal, which is inthe digital form, is presented to a filter 114. The filter 114 blocksthe DC component of the electrical signal. The filter 114 removes lowfrequencies from the electrical signal. In one embodiment, the lowfrequencies include frequencies less than about 100 Hertz. Theelectrical signal with the low frequencies removed is presented as asignal 116. The signal 116 is presented to the rest of the system 100for processing.

[0031] The signal 116 also forms a feedback signal 118. The feedbacksignal 118 is presented to a detector 120. In one embodiment, thedetector 120 inhibits apparent modulation in the feedback signal 118 soas to inhibit distortions in the signal 116. In another embodiment, thedetector 120 forms a smooth envelope of the feedback signal 118. Thesmooth envelope is a filtered estimate of the feedback signal 118. Thesmooth envelope lacks the apparent modulation. Because of the absence ofthe apparent modulation in the smooth envelope, distortion of the signal116 is inhibited.

[0032] The detector 120 presents the smooth envelope to an adjuster 122.The adjuster 122 adjusts the gain of the preamplifier 110 if the smoothenvelope is above or below a threshold. The adjuster 122 adjusts thegain of the preamplifier 110 by producing an adjustment signal. In oneembodiment, the adjustment signal is in a digital form. The digital formincludes a desirable number of bits (M) at a predetermined sampling rate(F_(S)).

[0033] The adjuster presents the adjustment signal to adigital-to-analog converter 124. The digital-to-analog converterconverts the adjustment signal from the digital form to an analog form.In analog form, the adjustment signal is an analog adjustment that isused by the preamplifier 110. The adjustment signal lacks the apparentmodulation. The preamplifier 110 amplifies the electrical signal usingthe adjustment signal so as to form an amplified electrical signal. Theamplified electrical signal excludes the amplitude modulation that wouldhave formed if the adjustment signal were to include the apparentmodulation. Thus, the amplified electrical signal contains desiredfrequency contents and lacks the amplitude modulation that gives rise todistortions.

[0034] In one embodiment, the detector 120 includes a Hilbert filter.The Hilbert filter receives the feedback signal 118 and produces twosignals that are 90 degrees out of phase with each other. The detector120 squares each signal of the two signals. The detector 120 then sumsthe two squared signals to form the smooth envelope. In anotherembodiment, the detector 120 takes the square root of the sum of the twosquared signals to form the smooth envelope.

[0035]FIG. 2 is a graph of an input signal according to one embodimentof the invention. The following discussion of FIG. 2 is for the purposeof illustration only. The graph 200 graphs a signal that is present in adigital automatic gain control loop. This signal exists after the act ofdetecting the envelope but before the act of adjusting the gain. Theabscissa of the graph 200 represents time in seconds. The ordinate ofthe graph 200 represents amplitude of the signal.

[0036] The signal is a 5.01 kHz sine wave that has been sampled at 20kHz. 5.01 kHz does not divide 20 kHz by exactly an integer fraction.Thus, according to the discussion hereinbefore, the signal appears as ifit includes an apparent modulation. The graph 200 confirms that theamplitude of the signal appears modulated. The apparent modulationoccurs as if the waveform of the electrical signal is modulated withanother signal. Mathematically, this other signal appears to be arectified sine wave with a frequency value of n[F_(S)m/n−F_(input)]. nincludes a set of whole numbers that is greater than 1. F_(S) is thesampling frequency. m includes a set of whole numbers excluding 0.F_(input) is the frequency of the electrical signal being input into theautomatic gain control.

[0037] This apparent modulation is the genesis that causes distortionswhen the apparent modulation is transferred to the gain during the actof adjusting the gain and eventually to the signal during the act ofamplifying the signal by the preamplifier. It is this apparentmodulation that is inhibited by the embodiments of the invention.

[0038] The graph 200 shows that the apparent modulation includes a depthof modulation. This depth of modulation can be used in this circumstanceto understand how much distortion is present in the signal: the deeperthe depth of modulation, the greater the distortion. The depth of themodulation depends on whether the frequency of the signal is evenlydivisible by the sampling frequency. If it is evenly divisible, or arational factor, the depth of modulation depends on the difference ofthe frequency of the signal and the nearest rational factor of thesampling frequency, the actual frequency of the signal, and thebandwidth of the control loop. The smaller the difference and the higherthe signal frequency, the greater the depth of modulation, for signalswithin the control bandwidth.

[0039] What is shown in the graph 200 is the apparent modulation thatmay give rise to the amplitude modulation and hence the distortions whenthe signal is amplified by the preamplifier. The amplitude modulationwill also include a depth of modulation. This depth of modulation tendsto be greater as the level of the signal rises above the threshold ofthe adjuster of the digital automatic gain control.

[0040] FIGS. 3-4 are graphs of a signal according to one embodiment ofthe invention. These graphs are for the purpose of illustration only.FIG. 3 shows a graph 300A of an input signal into a sound system havinga digital automatic gain control. The graph 300A graphs an input signalthat is presented to a digital automatic gain control. The abscissa ofthe graph 300A represents time in seconds. The ordinate of the graph300A represents amplitude of the signal.

[0041] The graph 300A graphs a portion 302A of the signal that has anamplitude above the threshold of the digital automatic gain control. Asdiscussed hereinbefore, the digital automatic gain control will reducethe amplitude of the input signal in the portion 302A by adjusting thegain of the preamplifier. A portion 304A of the graph 300A has anamplitude below the threshold of the digital automatic gain control. Asdiscussed hereinbefore, the digital automatic gain control will increasethe amplitude of the input signal in the portion 304A by adjusting thegain of the preamplifier.

[0042]FIG. 4 shows a graph 300B of an output signal in a sound systemhaving a digital automatic gain control. The graph 300B graphs an outputsignal that is produced by a digital automatic gain control. This outputsignal is processed from the input signal as shown in the graph 300A ofFIG. 3. The abscissa of the graph 300B represents time in seconds. Theordinate of the graph 300B represents amplitude of the signal.

[0043] A portion 302B of the graph 300B reflects the effort of thedigital automatic gain control to reduce the amplitude of the inputsignal. The peaks of the signal in portion 302B tend to bediscontinuous. These discontinuous peaks of the portion 302B areindicative of distortion in the signal. This distortion arises from theamplitude modulation of the signal that is inhibited by the embodimentsof the invention. A portion 304B of the graph 300B reflects the effortof the digital automatic gain control to increase the amplitude of theinput signal. The portion 304B shows a gradual increase in the amplitudeover time.

[0044]FIG. 5 shows a graph 400 of an output signal in a sound systemhaving a digital automatic gain control. The graph 400 graphs an outputsignal that is produced by a digital automatic gain control. This outputsignal is processed from the input signal as shown in the graph 300A ofFIG. 3. The abscissa of the graph 400 represents time in seconds. Theordinate of the graph 400 represents amplitude of the signal.

[0045] A portion 402 of the graph 400 indicates that the amplitude ofthe input signal is successfully reduced. Note that the peaks of theoutput signal are parabolic and not discontinuous. This indicates thatthe signal lacks the distortion that is caused by the amplitudemodulation as discussed hereinbefore. A portion 404 of the graph 400shows that the amplitude of the input signal is successfully increased.

[0046]FIG. 6 is a block diagram of a system according to one embodimentof the invention. A system 500 receives a signal, which represents soundenergy, from a microphone 502. The signal enters a preamplifier 504. Thepreamplifier 504 amplifies the signal so that the signal has strengthfor subsequent processing by the system 500. The signal, which isamplified, enters an analog-to-digital converter 506. Theanalog-to-digital converter 506 converts the signal to a digital signal.The digital signal is in a form that can be easily processed by adigital integrated circuit. The digital signal enters a decimator 508.The decimator 508 reduces the number of samples while increasing theword length in the digital signal for subsequent processing of thedigital signal. The digital signal, which has been decimated, enters aninterpolator 512. After interpolation by the interpolator 512, thedigital signal enters a digital-to-analog converter 514. Thedigital-to-analog converter 514 converts the digital signal to an analogsignal. The analog signal enters a speaker 516. The speaker 516reproduces sounds from the analog signal.

[0047] The digital signal, which has been decimated by the decimator508, is also processed by a digital automatic gain control 517. Recallthat the digital automatic gain control 517 helps to change the gain ofthe preamplifier 504. Specifically, the digital signal enters a filter518. The filter 518 filters out low frequencies in the digital signal.In one embodiment, the low frequencies include frequencies below 100Hertz.

[0048] The digital signal, which has been filtered, enters a detector519. The detector 519 uses Hilbert filters to detect the envelope of thedigital signal. Specifically, the digital signal enters a digital delayelement 520. The digital delay element 520 delays the digital signal andproduces a delayed signal. The delayed signal enters a first Hilbertfilter 524. The first Hilbert filter comprises an infinite impulseresponse filter. The first Hilbert filter 524 filters the delayed signalto form a first filtered signal. Besides presenting itself to thedigital delay element 520, the digital signal also enters a secondHilbert filter 522. The second Hilbert filter comprises another infiniteimpulse response filter. The second Hilbert filter 522 filters thedigital signal to form a second filtered signal.

[0049] The first filtered signal enters a first multiplier 528. Thefirst multiplier 528 squares the first filtered signal to form a firstsquared signal. The second filtered signal enters a second multiplier526. The second multiplier 526 squares the second filtered signal toform a second squared signal. Both the first squared signal and thesecond squared signal enter an adder 530. The adder 530 adds the firstsquared signal and the second squared signal together to form asum-of-square signal.

[0050] The sum-of-square signal enters a limiter 532. The limiter 532limits the digital range of the sum-of-square signal to a desiredoperating range. The sum-of-square signal then enters an adder 536. Theadder 536 determines the difference between the sum-of-square signal anda threshold 534. The sum-of-square signal is an envelope of the digitalsignal that is produced by the detector 519. Thus, in another view, theadder 536 determines the difference between the envelope of the digitalsignal and a threshold 534. As will be discussed, this difference isused to adjust the gain of the preamplifier 504.

[0051] The difference determined by the adder 536 enters an adjuster538. The adjuster 538 also receives the previous gain, an attack timeconstant, and a release time constant. The previous gain is the gainpreviously adjusted by the adjuster 538. The attack time constant isused to decrease the gain, and the release time constant is used toincrease the gain.

[0052] If the difference is negative, the adjuster 538 increases thegain of the preamplifier 504. The gain is increased by shifting the bitsof the previous gain to the right by the release time constant, andtaking the negative of the result of the shifting. In other words, whenthe envelope of the digital signal is below the threshold 534, the gainof the preamplifier 504 should be increased. Such increase depends onthe previous gain. The new gain is obtained by multiplying the previousgain by the inverse of a power of two. The modifier in this instance hasa direct relationship to the release time constant. The discussedimplementation uses shifts, which is equivalent to multiplications byinverse powers of two, to implement the time constants, but it should beunderstood that these time constants can be implemented by othertechniques, such as by regular multiplies.

[0053] If the difference is positive, the adjuster 538 decreases thegain of the preamplifier 504. The gain is decreased by shifting the bitsof the difference to the right by the attack time constant. In otherwords, when the envelope of the digital signal is above the threshold534, the gain of the preamplifier 504 should be decreased. Such decreasedepends on the difference between the envelope of the digital signal andthe threshold. The new gain is obtained by multiplying the difference bythe inverse of a power of two. The modifier in this instance has adirect relationship to the attack time constant.

[0054] The new gain enters an adder 540. The adder 540 adds the new gainto an adjusted previous gain to form the gain. The adjusted previousgain is formed from a width adjuster 542 that adjusts the width of theword of the previous gain. The gain enters a limiter 544. The limiter544 limits the range of the gain. The gain then enters a buffer 546. Thebuffer 546 stores the gain and presents the gain to a rounding circuit548. The buffer 546 also feeds back the gain to the width adjuster 542and the adjuster 538. The rounding circuit 548 rounds the gain to asmaller precision value so as to be compatible with the input width ofsubsequent circuitry.

[0055] The gain, which is rounded, enters a digital-to-analog converter550. The digital-to-analog converter 550 converts the gain from digitalto analog and presents the gain, which is now analog, to thepreamplifier 504. The preamplifier 504 uses the gain to amplify thesignal, which represents sound energy, from the microphone 502.

[0056]FIG. 7 is a block diagram of a filter according to one embodimentof the invention. The filter 600 acts to filter out low frequencies froma digital signal. The digital signal enters both a first adder 604 and afirst digital delay element 602. The first digital delay element 602delays the digital signal to produce a delayed digital signal. The adder604 determines the difference between the digital signal and the delayeddigital signal. This difference enters a multiplier 606. The multiplier606 multiplies the difference by a scale 608 to produce a scaled signal.The scale 608 is used to inhibit the filter 600 from overflow. Thescaled signal enters a second adder 610. The second adder 610 adds thescaled signal with a block signal to produce a filtered signal. Theblock signal will be discussed hereinafter. The filtered signal enters asecond digital delay element 616. The second digital delay element 616delays the filtered signal. The filtered signal then exits the filter600. A portion of the filtered signal feeds back into a secondmultiplier 614. The second multiplier 614 multiplies the filteredsignal, which is delayed, by an alpha signal to form the blocked signal.The alpha signal determines a range of frequencies that will be blockedby the filter 600.

[0057]FIG. 8 is a block diagram of a filter according to one embodimentof the invention. A filter 700 is an infinite-impulse response filter.The filter 700 is configured as a two-zeros two-poles filter. The filter700 can be used as a Hilbert filter in a detector as part of a digitalautomatic gain control circuit. The digital signal enters a firstdigital delay element 702, a second digital delay element 704, and ascale element 712. Thus, the digital signal is delayed by the firstdigital delay element 702, delayed by the second digital delay element704, and scaled by the scale element 712 to produce a scaled signal.

[0058] The digital signal also enters a first adder 706. The first adder706 determines the difference between the digital signal and thefeedback signal. The difference enters a multiplier 708. The multiplier708 multiplies the difference and a beta signal 710 to form a modifiedsignal. The beta signal 710 acts to control the phase of the difference.The beta signal contains a number of bits that is used to represent adesired number to be input into the multiplier 708.

[0059] The modified signal enters a third digital delay element 716. Thethird digital delay element 716 delays the modified signal to form afiltered signal. The filtered signal exits the filter 700 to be used byother circuitry. A portion of the filtered signal enters a fourthdigital delay element 718. The fourth digital delay element 718 delaysthe filtered signal to form the feedback signal.

[0060]FIG. 9 is a process diagram of a method according to oneembodiment of the invention. The process 800 discusses the feedback loopthat analyzes the digital signal and determines whether the level of thedigital should be adjusted. The process 800 begins at an act 802. Theact 802 converts an analog signal to a digital signal. The digitalsignal is presented to an act 804. The act 804 blocks low frequenciesfrom the digital signal to produce a filtered signal. In one embodiment,the low frequencies, which are blocked, are less than about 100 Hertz.

[0061] The filtered signal is presented to an act 806. The act 806 formsan envelope that lacks the apparent modulation. One suitable techniqueof forming an envelope that lacks the apparent modulation includes usingHilbert filters. The envelope is presented to an act 810. The act 810subtracts the envelope from a threshold to form a difference. Thedifference is presented to acts 812 and 814.

[0062] The act 812 determines if the difference is greater than zero. Ifthe difference is greater than zero, the gain should be decreased. Inother words, the envelope of the digital signal is greater than thethreshold. The digital signal is at a level beyond the operating rangeof a processing system and such level should be decreased. If thedifference is less than zero, than the gain should be increased. Whenthe envelope of the digital signal is less than the threshold, thedigital signal should be strengthened by increasing the gain forsubsequent processing.

[0063] The result of the act 812 is presented to an act 818. The act 818uses the result of the act 812 to select the result of either act 814 oract 816 to form a gain. Thus, the act 818 switches between the result ofthe act 814 or the act 816 depending on the result of the act 812. Ifthe gain needs to be decreased, the act 818 selects the result of theact 814. The act 814 decreases the gain by shifting the bits of thedifference to the right by an attack constant. If the gain needs to beincreased, the act 818 selects the result of the act 816. The act 816increases the gain by shifting the bits of the feedback signal, which isdelayed and negated, to the right by a release constant.

[0064] The gain, which is formed by the act 818, is presented to an act824. The act 824 sums the gain and the feedback signal, which isdelayed. The feedback signal, which is delayed, is formed by an act 822.The act 820 negates the feedback signal, which is delayed, and presentsthe result to the act 816 as discussed hereinbefore.

[0065] The act 826 equates the gain to 0 if the gain is less than orequal to zero. Otherwise, the act 828 equates the gain to 1 if the gainis greater than 1. The result of the act 826 and the act 828 ispresented to an act 830. The act 830 converts the digital form of thegain to an analog form, which is suitable for an analog preamplifier.

Conclusion

[0066] Thus, systems, devices, and methods have been discussed forinhibiting undesired amplitude modulation which causes distortions inthe amplified signal in a sound system. The embodiments of the inventioninhibit such undesired amplitude modulation by reducing apparentsampling rate distortion.

[0067] The digital system as described has a number of benefits not seenbefore. One benefit is an enhanced manufacturing process that reduces aneed for external components, such as capacitors, and the need to couplethe external components to a circuit through I/O pins. Another benefitincludes a reduction in the die area required to implement the digitalautomatic gain control loop. Other benefits include an enhanced controlof the tolerance of the bandwidth of the automatic gain control, and thetolerance of the loop time constants of the automatic gain control. Thesystem also benefits from an enhanced power efficiency and low operatingvoltage performance. Additionally, the system allows a non-linear signalprocessing by selectively controlling the gain of the preamplifier orproviding information to a Nyquist-rate digital signal processor tocompensate for adaptive gain changes in the preamplifier.

[0068] Although the specific embodiments have been illustrated anddescribed herein, it will be appreciated by those of ordinary skill inthe art that any arrangement which is calculated to achieve the samepurpose may be substituted for the specific embodiment shown. Thisapplication is intended to cover any adaptations or variations of thepresent invention. It is to be understood that the above description isintended to be illustrative and not restrictive. Combinations of theabove embodiments and other embodiments will be apparent to those ofskill in the art upon reviewing the above description. The scope of theinvention includes any other applications in which the above structuresand fabrication methods are used. Accordingly, the scope of theinvention should only be determined with reference to the appendedclaims, along with the full scope of equivalents to which such claimsare entitled.

We claim:
 1. A hearing aid, comprising: a microphone to receive an inputsignal; a speaker to reproduce the input signal; and a processor toprocess the input signal at a gain, wherein the processor includes aninhibitor to inhibit distortions and an adjuster to adjust the gain ofthe input signal, wherein the inhibitor smoothes an envelope of theinput signal so as to inhibit distortions arising from apparentmodulation of the input signal.
 2. The hearing aid of claim 1, whereinthe inhibitor creates two representations that are orthogonal to eachother in phase.
 3. The hearing aid of claim 1, wherein the inhibitorincludes a multiple of time-constant circuits to smooth the envelope ofthe input signal.
 4. The hearing aid of claim 1, wherein the inhibitorincludes a detector having a Hilbert filter so as to smooth the envelopeof the input signal.
 5. The hearing aid of claim 1, wherein theinhibitor includes an estimator that estimates at least one of a minimumand a maximum of two representations of the input signal that areorthogonal to each other in phase, wherein the estimator allows a linearextraction of the amplitude so as to smooth the envelope of the inputsignal.
 6. A method for providing automatic gain control, comprising:smoothing an envelope of an input signal having a gain; and adjustingthe gain if the envelope is one of two conditions, wherein the twoconditions includes being greater than a threshold and being less thanthe threshold, wherein the act of smoothing inhibits distortions arisingfrom modulation of the input signal.
 7. The method of claim 6, whereinsmoothing includes creating two representations of the input signal,wherein the two representations are orthogonal to each other in phase.8. The method of claim 7, wherein creating includes creating themagnitude of the two representations to approximate the magnitude of theinput signal.
 9. The method of claim 7, wherein smoothing includessmoothing using a Hilbert filter.
 10. The method of claim 9, whereinsmoothing includes squaring each sample to form a squared sample,summing each squared sample with other squared samples to form a sum,and taking a square root of the sum.
 11. A hearing aid, comprising: anadjuster to adjust a gain so as to amplify an input signal; and adetector to form a smooth envelope that is a rectified version of theinput signal, wherein the detector presents the smooth envelope to theadjuster, and wherein the smooth envelope excludes apparent modulationof the input signal.
 12. The hearing aid of claim 11, further comprisinga preamplifier having a gain to amplify the input signal, wherein theadjuster adjusts the gain of the preamplifier.
 13. The hearing aid ofclaim 12, further comprising an analog-to-digital converter thatreceives the input signal, which is amplified by the preamplifier, andproduces a digitized input signal.
 14. The hearing aid of claim 13,further comprising a filter to receive the digitized input signal and toproduce a filtered input signal that excludes a direct-current componentof the digitized input signal.
 15. The hearing aid of claim 14, furthercomprising a digital-to-analog converter that receives a digitaladjustment from the adjuster, produces an analog adjustment, andpresents the analog adjustment to the preamplifier.
 16. A hearing aid,comprising: a preamplifier having a gain to amplify the input signal; adetector to form a smooth envelope that is rectified; and an adjuster toadjust the gain of the preamplifier if the smooth envelope is one of twoconditions, wherein the two conditions includes being greater than athreshold and being less than the threshold, and wherein the smoothenvelope is defined to exclude the modulation that distorts the inputsignal.
 17. The hearing aid of claim 16, further comprising a filter toproduce a filtered input signal that excludes direct current.
 18. Thehearing aid of claim 17, wherein the detector includes a Hilbert filter,wherein the Hilbert filter receives the filtered input signal, andproduces two signals that are 90 degrees out of phase with each other.19. The hearing aid of claim 18, wherein the detector squares eachsignal of the two signals, sums the two squared signals to form a sum,and takes the square root of the sum to form the smooth envelope of theinput signal.
 20. The hearing aid of claim 18, wherein the detectorsquares each signal of the two signals and sums the two squared signalsto form the smooth envelope of the input signal.
 21. A digital analoggain control, comprising: a detector to detect an envelope of an inputsignal using Hilbert filters; an adder to provide a difference betweenthe envelope and a threshold; and an adjuster that adjust a gain if thedifference is one of two conditions, wherein the two conditions includesbeing greater than zero and being less than zero.
 22. The digital analoggain control of claim 21, further comprising a filter that removes lowfrequencies, wherein the filter receives the input signal, removesfrequencies less than about 100 Hertz from the input signal, andpresents the input signal to the detector.
 23. The digital analog gaincontrol of claim 22, further comprising a digital delay element thatreceives the input signal and presents a delayed input signal.
 24. Thedigital analog gain control of claim 23, further comprising a firstHilbert filter and a second Hilbert filter, wherein the first Hilbertfilter receives the delayed input signal and filters the delayed inputsignal to form the first filtered input signal, and wherein the secondHilbert filter receives the input signal and filters the input signal toform the second filtered input signal.
 25. The digital analog gaincontrol of claim 24, further comprising a first multiplier and a secondmultiplier, wherein the first multiplier receives the first filteredinput signal and squares the first filtered input signal to form a firstsquared signal, and wherein the second multiplier receives the secondfiltered input signal and squares the second filtered input signal toform a second squared signal.
 26. The digital analog gain control ofclaim 25, further comprising another adder to add the first squaredsignal and the second squared signal to form a sum-of-square signal. 27.The digital analog gain control of claim 26, further comprising alimiter that receives the sum-of-square signal, limits the sum-of-squaresignal to a desired range, and presents a limited signal to the adderthat provides the difference between the envelope and the threshold. 28.A digital analog gain control, comprising: a detector to detect anenvelope of an input signal using Hilbert filters; an adder to provide adifference between the envelope and a threshold; and an adjuster thatreceives the difference, a release time constant, and an attack timeconstant, wherein the adjuster adjust a gain if the difference is one oftwo conditions, wherein the two conditions includes being a negativenumber and being a positive number, wherein the adjuster increases thegain if the difference is negative, and wherein the adjuster decreasesthe gain if the difference is positive.
 29. The digital analog gaincontrol of claim 28, wherein the adjuster receives a previous gain,wherein if the difference is negative, the adjuster increases the gainby shifting the bits of the previous gain to the right by the releasetime constant to form a new gain and taking the negative of the newgain.
 30. The digital analog gain control of claim 29, wherein if thedifference is positive, the adjuster decreases the gain by shifting thebits of the difference to the right by the attack time constant to formthe new gain.
 31. The digital analog gain control of claim 30, furthercomprising a width adjuster that adjusts the word with of the previousgain and presents an adjusted previous gain.
 32. The digital analog gaincontrol of claim 31, further comprising another adder that adds the newgain and the adjusted previous gain to form the gain.
 33. The digitalanalog gain control of claim 32, further comprising a limiter to thelimit the range of the gain so that the gain is positive.
 34. Thedigital analog gain control of claim 33, further comprising a bufferthat stores the gain and presents the stored gain, wherein the storedgain is defined as the previous gain, which is presented to the adjusterand the width adjuster.
 35. The digital analog gain control of claim 34,further comprising a rounding circuit that rounds the stored gain to asmaller precision value so as to be compatible with the input width ofsubsequent circuitry that includes a digital-to-analog converter.
 36. Adigital analog gain control, comprising: a filter to block lowfrequencies from an input signal; a detector to detect an envelope ofthe input signal using Hilbert filters; an adder to provide a differencebetween the envelope and a threshold; and an adjuster that receives thedifference, a release time constant, and an attack time constant,wherein the adjuster adjust a gain if the difference is one of twoconditions, wherein the two conditions includes being a negative numberand being a positive number, wherein the adjuster increases the gain ifthe difference is negative, and wherein the adjuster decreases the gainif the difference is positive.
 37. The digital analog gain control ofclaim 36, wherein the filter includes a first digital delay thatreceives the input signal and presents a delayed input signal.
 38. Thedigital analog gain control of claim 37, wherein the filter includes afirst adder that determines a difference between the input signal andthe delayed input signal.
 39. The digital analog gain control of claim38, wherein the filter includes a first multiplier that multiplies thedifference and a scale to form a scaled signal, wherein the scaledsignal inhibits the filter from overflow.
 40. The digital analog gaincontrol of claim 39, wherein the filter includes a second adder thatadds the scaled signal and a blocked signal to form a filtered signal.41. The digital analog gain control of claim 40, wherein the filterincludes a second digital delay that receives the filtered signal andpresents a filtered signal that is delayed.
 42. The digital analog gaincontrol of claim 41, wherein the filter includes a second multiplierthat multiplies the filtered signal that is delayed and an alpha signalto form a blocked signal, wherein the alpha signal determines a range offrequencies that will be blocked by the filter.
 43. A digital analoggain control, comprising: a detector to detect an envelope of the inputsignal using IIR filters; an adder to provide a difference between theenvelope and a threshold; and an adjuster that receives the difference,a release time constant, and an attack time constant, wherein theadjuster adjust a gain if the difference is one of two conditions,wherein the two conditions includes being a negative number and being apositive number, wherein the adjuster increases the gain if thedifference is negative, and wherein the adjuster decreases the gain ifthe difference is positive.
 44. The digital analog gain control of claim43, wherein the IIR filters are defined to be infinite-impulse-responsefilters.
 45. The digital analog gain control of claim 44, wherein eachinfinite-impulse-response filter includes a first delay, a second delay,and a scale element, wherein the input signal is delayed by the firstdelay, delayed by the second delay, and scaled by the scale element toform a scaled signal.
 46. The digital analog gain control of claim 45,wherein each infinite-impulse response filter includes a first adderthat determines a difference between the input signal and a feedbacksignal.
 47. The digital analog gain control of claim 46, wherein eachinfinite-impulse-response filter includes a multiplier that multipliesthe difference and a beta signal to form a modified signal, wherein thebeta signal modifies the phase of the difference.
 48. The digital analoggain control of claim 47, wherein each infinite-impulse-response filterincludes a third delay that delays the modified signal to form afiltered signal.
 49. The digital analog gain control of claim 48,wherein each infinite-impulse-response filter includes a fourth delaythat delays the filtered signal to form the feedback signal.
 50. Amethod for controlling a gain of an amplifier, comprising: blocking lowfrequencies from an input signal that is digitized; forming an envelopethat lacks modulation using Hilbert filters; and subtracting theenvelope from a threshold to form a difference, wherein the differenceis used to control the gain.
 51. The method of claim 50, whereinblocking includes blocking low frequencies that are less than about 100Hertz.
 52. The method of claim 50, further comprising determining if thedifference is greater than zero.
 53. The method of claim 52, furthercomprising shifting the bits of the difference to the right by an attackconstant to form a decreased gain.
 54. The method of claim 53, furthercomprising shifting the bits of a negated signal to the right by arelease constant to form an increased gain.
 55. The method of claim 54,further comprising switching for presenting the decreased gain as thegain if the difference is greater than zero, or else the act ofswitching presents the increased gain as the gain if the difference isless than zero.
 56. The method of claim 55, further comprising summingthe gain and the feedback signal that is delayed to form a modified gainsignal.
 57. The method of claim 56, further comprising presenting afinal gain to an analog-to-digital converter, wherein the final gain iszero if the modified gain signal is less than or equal to zero, andwherein the final gain is one if the modified gain signal is greaterthan one.
 58. The method of claim 57, further comprising delaying thefinal gain to produce the feedback signal that is delayed.
 59. Themethod of claim 58, further comprising negating the feedback signal thatis delayed to form the negated signal.